<?php
	require_once "HTML/Table.php";
	$table = new HTML_Table();
	
	$table->setHeaderContents(0, 0, "Mã thú");
	$table->setHeaderContents(0, 1, "Tên");
	$table->setHeaderContents(0, 2, "Đơn giá");
	$table->setHeaderContents(0, 3, "Hình ảnh");
	$table->setHeaderContents(0, 4, "Số lượng");
	$table->setHeaderContents(0, 5, "Ngày sinh");
	$table->setHeaderContents(0, 6, "Xuất xứ");
	$table->setHeaderContents(0, 7, "Loại");
	$table->setHeaderContents(0, 8, "Mô tả");
	
	$numRow = 1;
	
	foreach($row as $todo)
	{
		for($col = 0;$col<9;$col++)
		{
			$table->setCellContents($numRow,$col,$row['ThuCung']['maThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['tenThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['donGiaThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['hinhAnhThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['soLuongThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['ngaySinhThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['xuatXuThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['loaiThu']);
			$table->setCellContents($numRow,$col,$row['ThuCung']['moTaThu']);
			
		}
		$numRow++;
	}
	
	echo $table->toHTML();